package AcWing周赛;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-08-27
 * Time: 19:28
 */
public class Demo66_3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] array = new int[n];
        int[] p = new int[110];
        char[] ch = new char[n];
        for(int i = 0; i < n; i++){
            int x = scanner.nextInt();
            array[i] = x;
            p[x]++;
        }
        int count1 = 0;
        int count2 = 0;
        for(int i = 0; i < n; i++){
            if(p[array[i]] == 1){
                count1++;
            }else if(p[array[i]] == 2){
                count2++;
            }
        }
        boolean flag = true;
        if(count1 % 2 == 0){
            System.out.println("YES");
            for(int i = 0; i < n; i++){
                if(p[array[i]] == 1){
                    if(flag){
                        ch[i] = 'A';
                        flag = false;
                    }else{
                        ch[i] = 'B';
                        flag = true;
                    }
                }else{
                    ch[i] = 'A';
                }
            }
            for(int i = 0; i < n; i++){
                System.out.print(ch[i]);
            }
        }else{
            if(count1 + count2 == n){
                System.out.println("NO");
            }else{
                System.out.println("YES");
                for(int i = 0; i < n; i++){
                    if(p[array[i]] == 1){
                        if(flag){
                            ch[i] = 'A';
                            flag = false;
                        }else{
                            ch[i] = 'B';
                            flag = true;
                        }
                    }else{
                        ch[i] = 'A';
                    }
                }
                for(int i = 0; i < n; i++){
                    if(p[array[i]] > 2){
                        ch[i] = 'B';
                        break;
                    }
                }
                for(int i = 0; i < n; i++){
                    System.out.print(ch[i]);
                }
            }
        }
    }
}
